Create Python code that can do ALL of the following things:

Setup

  • Create a 20 x 20 board
  • Put a starting configuration of shapes on the board
  • Make sure you leave empty slots so shapes can move
  • Plot the board (we'll need to see it so we can see what's happening)

Run

  • Determine when a shape is unhappy
  • Move unhappy shapes
  • Continue to update the plot so the user can always see the current state of the board

Stop

  • Your simulation needs to be able to stop. It's up to you to decide what the stop condition is, and to figure out how to make sure that your code doesn't run forever.

In [ ]: